using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Trans.C2b;

namespace JlPay.Sdk.Services.Trans.C2b
{
    /// <summary>
    /// 二维码支付服务
    /// </summary>
    public class QrcodePayService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public QrcodePayService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 二维码支付接口
        /// </summary>
        /// <param name="request">二维码支付请求</param>
        /// <returns>二维码支付响应结果</returns>
        public async Task<QrcodePayResponse> QrcodePayAsync(QrcodePayRequest request)
        {
            return await PostAsync<QrcodePayRequest, QrcodePayResponse>(request, QrcodePayRequest.API_URL);
        }
    }
} 